<?php
/**
 *    Copyright 2010 Show Framework(www.showframework.cn)
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 * 
 *        http://www.apache.org/licenses/LICENSE-2.0
 * 
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

/**
 * 配置接口
 * 
 * @package Show_Config
 * @name Show_Config_Interface
 * @author show
 * @since v0.6
 */
interface Show_Config_Interface
{
    /**
     * 支持$config->name的访问方式
     *
     * @param string $name
     * @return mixed
     */
    public function __get($name);
    
    /**
     * 获取名称为 $name 的一个配置或一组配置
     *
     * @param string $name
     * @return mixed
     */
    public function get($name);
    
    /**
     * 将自己转换成array
     *
     * @return array
     */
    public function toArray();
    
    /**
     * 配置中是否有 以 $name 命名的一项
     *
     * @param string $name
     * @return bool
     */
    public function has($name);
}
?>